require.config({
	paths: {
		'text': "libs/text-require",
		'templets': "../templets",
		'bootstrap': "../bootstrap/js/bootstrap",
		'backbone': "libs/Backbone/backbone.min",
		'underscore': "libs/Backbone/underscore.min",
		'jqueryform': "libs/jquery.form",
		'jquerypage': "libs/jquery-pager/jquery.pager",
		'jAlert': "libs/jAlert/jquery.alerts",
		'select2': "libs/select2/select2",
		'uploadify': 'libs/uploadify/jquery.uploadify',
		'moment': 'libs/bootstrap-daterangepicker/moment',
		'daterangepicker': 'libs/bootstrap-daterangepicker/daterangepicker',
		'ueditor': 'libs/umeditor1_2_2-utf8-php/umeditor.min',
		'jquery': 'empty:'
	},
	urlArgs: "bust=" + (new Date()).getTime(),
	waitSeconds: 0
});

(function(root) {
	root.loading = '<div class="loading"><div class="load3"><div class="double-bounce1"></div><div class="double-bounce2"></div></div><p>正在加载数据...</p></div>';
	root.loading2 = '<div class="file-loading-container container1"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div>' +
		'<div class="file-loading-container container2"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div>' +
		'<div class="file-loading-container container3"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div>';
	root.adminPath = '';
	root.picPath = './Public/home/uploads/';
	root.UM_INIT_ARTICLE = false;

	Array.prototype.remove = function(dx)　 {
		if (isNaN(dx) || dx > this.length) {
			return false;
		}
		for (var i = 0, n = 0; i < this.length; i++)　　 {
			if (this[i] != this[dx])　　　　 {
				this[n++] = this[i]
			}
		}
		this.length -= 1
	}
})(this);

$('#LOGIN').length === 0 || require(['plus/login']);

$('#MAIN').length === 0 || require(['route/route', 'bootstrap', 'jAlert'], function(Route) {
	new Route;
	Backbone.history.start();
});